import { get, post } from "./http"
//登录
export const reqLogin = (user) => post("/api/login", user)

// //注册
export const reqRegister = user => post("/api/register", user)

// //分类
// export const reqHomeCate = () => get("/api/getCate")

// //列表
// export const reqList = (params) => get("/api/getgoodlist", params)

// //详情
// export const reqDetail = params => get("/api/getgoodsinfo", params)

// 一级分类
export const reqFirstCate = params => get('/api/getcate')

// 一级分类下面的所有数据
export const reqFirstCateGood = (params) => get('/api/getgoodlist', params)

// 轮播
export const reqSwipde = params => get('/api/getbanner')

// 首页数据
export const reqHomeGoods = params => get('/api/gethortgoods')

// 全部分类
export const reqAllCates = params => get('/api/getcates')

// 详情
export const reqDetail = params => get('/api/getgoodsinfo', params)

// 添加到购物车
export const reqAdd = params => post('/api/cartadd', params)

// 购物车
export const reqCar = params => get('/api/cartlist', params)


// 购物车删除
export const reqDelCar = params => post('/api/cartdelete', params)

// 购物车修改
export const reqShopEdit = params => post("/api/cartedit", params)


// 生成订单
export const reqOrderAdd = params => post('/api/orderadd', params)

// 地址列表
export const reqAddressList = params => get('/api/addresslist', params)

// 地址添加
export const reqAddressListAdd = params => post('/api/addressadd', params)

// 地址修改
export const reqAddressEdit = params => post('/api/addressedit', params)

// 删除地址
export const reqAddressDel = params => post('/api/addressremove', params)

// 搜索
export const reqSearch = params => get('/api/search',params)

// 支付
// export const

